<div class="banner">
    <ul class="bn_bgSet">
        <li style="background: url('<?php echo image_path("banner/banner11.jpg")?>') no-repeat 49% 50%;"></li>
        
        
        <li style="background: url('<?php echo image_path("banner/banner10.png")?>') no-repeat 49% 50%;"><a href="notice/detail/6.htm"></a></li>
        
        
        <li style="background: url('<?php echo image_path("banner/banner3.jpg")?>') no-repeat 49% 50%;"><a href="<?php echo url_for('default/bidflow') ?>"></a></li>
    </ul>
    <div class="bn_menuWrap">
        <ul class="bn_menuSet">
            <li>
                <img src="<?php echo image_path("main/btn_off.gif")?>" alt="" /></li>
            <li>
                <img src="<?php echo image_path("main/btn_off.gif")?>" alt="" /></li>
            <li>
                <img src="<?php echo image_path("main/btn_off.gif")?>" alt="" /></li>
        </ul>
        <div class="bn_next">
            <img src="<?php echo image_path("main/nextArrow.png")?>" alt="NEXT" />
        </div>
        <div class="bn_prev">
            <img src="<?php echo image_path("main/prevArrow.png")?>" alt="PREV" />
        </div>
    </div>

</div>
<div class="mp_1">
    <div class="wrap">
        <div class="ft-l item">
            <div class="item-img" id="itemimg-tag0" onclick="window.location.href='<?php echo url_for('project/list')?>'"></div>
            <div class="teal teal_1" onclick="window.location.href='<?php echo url_for('project/list')?>'">我要理财<span class="af-1"></span></div>
            成为理财人，通过主动选择标的进行出借投资，可获得预期 8 - 14% 安全稳定年化收益。
        </div>
        <div class="ft-l item">
            <div class="item-img" id="itemimg-tag1" onclick="window.location.href='<?php echo url_for('loan/list')?>'"></div>
            <div class="teal teal_2" onclick="window.location.href='<?php echo url_for('loan/list')?>'">我要融资<span class="af-2"></span></div>
            成为融资人，提交信用信息获得微美认证通过后，通过线上发布借款标融资，快速简单。
        </div>
        <div class="ft-l item">
            <div class="item-img" id="itemimg-tag2" onclick="window.location.href='<?php echo url_for('default/security')?>'"></div>
            <div class="teal teal_3" onclick="window.location.href='<?php echo url_for('default/security')?>'">安全保障<span class="af-3"></span></div>
            微美所有投资资金都由第三方支付平台进行托管，有效保障用户资金安全。
        </div>
    </div>
</div>
<div class="mp_2">
    <div class="wrap">
        8-14% 预期年化收益，100元起投，最快30天可收回投资，行业领先，稳定安全！&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <button type="button" class="btn btn-warning btn-lg" onclick="window.location.href='<?php echo url_for('user/register'); ?>'">免费注册</button>&nbsp;&nbsp;&nbsp;
                <button type="button" class="btn btn-primary btn-lg" onclick="window.location.href='<?php echo url_for('user/login'); ?>'">登  录</button>
        <div class="after"></div>
    </div>
</div>
<div class="mp_3"><span>我要投资</span></div>
<div class="mp_4">
    <div class="wrap">
            <?php if(!empty($list)):?>
            <?php foreach($list as $result):?>
            <div class="lenditem">
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title ft-l">
			  <a href="<?php echo url_for('project/index?id='.$result->getId())?>"><?php if(mb_strlen($result->getTitle()) > 26 ): ?><?php echo mb_substr($result->getTitle(),0,14, 'utf-8').'...';?><?php else: ?><?php echo $result->getTitle() ?><?php endif; ?></a></h3>
                        <span class="icon20_b <?php echo Loan::$list_type_class_name[$result->getListType()]; ?> ft-r" title="<?php echo $result->getListTypeToString(); ?>"></span>
                    </div>
                    <div class="panel-body">
                        <div class="can-a">
			   <?php if($result->getStatus() == 1):?>
                                   <canvas class="ft-l" progress="<?php echo bcdiv($result->getRemainder(),$result->getMoney(),4)*100 ?>" height="78" width="78" name="Chart" style="width: 78px; height: 78px;"></canvas>
                                <?php endif;?>
                                 <?php if($result->getStatus() == 2):?>
                                   <img src="<?php echo image_path('lend/lendman.png')?>" class="lending ft-l" />
                               <?php endif;?>   
                                <?php if($result->getStatus() == 3):?>
                                   <img src="<?php echo image_path('lend/lendman.png')?>" class="lending ft-l" />
                                <?php endif;?>   
                                <?php if($result->getStatus() == 4):?>
                                   <img src="<?php echo image_path('lend/lending.png')?>" class="lending ft-l" />
                               <?php endif;?>
                               <?php if($result->getStatus() == 5):?>
                                   <img src="<?php echo image_path('lend/lendok.png')?>" class="lending ft-l" />
                               <?php endif;?>
                               <?php if($result->getStatus() == 6):?>
                                   <img src="<?php echo image_path('lend/lendlost.png')?>" class="lending ft-l" />
                               <?php endif;?>  
                               <?php if($result->getStatus() == 7):?>
                                   <img src="<?php echo image_path('lend/lendlost.png')?>" class="lending ft-l" />
                               <?php endif;?>  

                            <div class="can-r">
                                <?php if($result->getStatus() == 4):?>
                                <p>还款中</p>
                                <?php endif;?>
				<?php if($result->getStatus() == 2):?>
                                <p>审核中</p>
                                <?php endif;?>
				<?php if($result->getStatus() == 6 || $result->getStatus() == 7 ):?>
                                <p>借款失败</p>
                                <?php endif;?>
                                <?php if($result->getStatus() == 1):?>
                                <p>投标中</p>
                                <?php endif;?>
                                <p>剩余时间 
				   <?php if($result->getStatus() == 1): ?>
                                    <?php $end_time = $result->getTime();?>
                                    <?php if(strtotime($end_time) < time()):?>
                                        已经结束
                                    <?php else:?>
                                        <?php echo date('Y/m/d',strtotime($end_time));?>
                                    <?php endif;?>
                                        <?php else: ?>
                                        已经结束
                                        <?php endif; ?>
				</p>
                            </div>
                        </div>
                        <div class="can-b">
                            <ul class="list-group m-page">
                                <li class="list-group-item"><span class="icon20_g icon_money ft-l"></span><span class="can-b-t">融资金额</span><span class="can-b-a"><?php echo sfConfig::get('app_symbol').number_format($result->getMoney(),2);?></span></li>
                                <li class="list-group-item"><span class="icon20_g icon_barchart ft-l"></span><span class="can-b-t">年化利率</span><span class="can-b-a can-b-c">                                        
				    <?php if($result->getListType() == 1):?>
                                           <?php echo $result->getMoneyRate()-2?>%+ 2%
                                            <?php else:?>
                                             <?php echo number_format($result->getMoneyRate(),2)."%"?>
                                        <?php endif;?>
				  </span></li>
                                <li class="list-group-item"><span class="icon20_g icon_notepad ft-l"></span><span class="can-b-t">融资期限</span><span class="can-b-a"><?php echo $result->getTermNumToString() ?></span></li>
                            </ul>
                        </div>
                            <a href="<?php echo url_for('project/index?id='.$result->getId())?>" class="btn btn-default btn-lg btn-block">查看详情</a>
                    </div>
                </div>
            </div>
        <?php endforeach;?>
        <?php endif;?>
        
        
    </div>
</div>
<div class="line_main">
    <div class="line">
        <label>
            <button type="button" class="btn btn-clear" onclick="window.location.href='<?php echo url_for('project/list')?>'">查看更多</button>
        </label>
    </div>
</div>
<div class="mp_5">
    <div class="media_nav">
        <ul class="bn_bgSet">
            <li>
                <h4>媒体报道</h4>
                <div class="medianav">
                    <a href="about/media.htm">
                        <img class="first" src="<?php echo image_path("media/mts.png")?>"/></a>
                    <a href="about/media.htm">
                        <img class="" src="<?php echo image_path("media/wy.png")?>"/></a>
                    <a href="about/media.htm">
                        <img class="" src="<?php echo image_path("media/shsb.png")?>"/></a>
                    <br />
                    <a href="about/media.htm">
                        <img class="first" src="<?php echo image_path("media/dfcfw.png")?>" /></a>
                    <a href="about/media.htm">
                        <img class="" src="<?php echo image_path("media/zgcjw.png")?>"/></a>
                    <a href="about/media.htm">
                        <img class="" src="<?php echo image_path("media/zqzx.png")?>"/></a>
                </div>
            </li>


            <li>
                <h4>行业资讯</h4>
                <div class="medianav">
                    <dl>
                        <dd><a href="about/industry.htm"><span class="ft-l">票据理财疯起来：一元门槛 高收益引疯狂抢购</span><span class="ft-r">2014-07-03</span></a></dd>
                        <dd><a href="about/industry.htm"><span class="ft-l">人民银行发布2013年年报开辟专栏总结互联网金融</span><span class="ft-r">2014-07-02</span></a></dd>
                        <dd><a href="about/industry.htm"><span class="ft-l">吴晓灵全面展望互联网金融：“P2P和众筹最有前途”</span><span class="ft-r">2014-06-30</span></a></dd>

                    </dl>
                </div>
            </li>
            <li>
                <h4>网站公告</h4>
                <div class="medianav">
                        <dl>
                                <dd><a href="notice/detail/11.htm"><span class="ft-l">银行承兑汇票质押融资标上线</span><span class="ft-r">2014-08-27</span></a></dd>
                                <dd><a href="notice/detail/10.htm"><span class="ft-l">“注册有礼”活动提现时间延长相关说明</span><span class="ft-r">2014-08-21</span></a></dd>
                                <dd><a href="notice/detail/9.htm"><span class="ft-l">第一批充值手续费已于今日成功返还到账</span><span class="ft-r">2014-08-15</span></a></dd>
                        </dl>
                </div>
            </li>
        </ul>
        <div class="bn_menuWrap">
            <ul class="bn_menuSet">
                <li>
                    <img src="<?php echo image_path("main/btn_off.gif")?> " alt="" /></li>
                <li>
                    <img src="<?php echo image_path("main/btn_off.gif")?>" alt="" /></li>
                <li>
                    <img src="<?php echo image_path("main/btn_off.gif")?>" alt="" /></li>
            </ul>
            <div class="bn_next">
                <img src="<?php echo image_path("main/nextArrow-g.png")?>" alt="NEXT" />
            </div>                                       
            <div class="bn_prev">                        
                <img src="<?php echo image_path("main/prevArrow-g.png")?>" alt="PREV" />
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    var mainpage = new mainpage();
</script>


